/*
 * Copyright (c) 2022 上海市政工程设计研究总院(集团)有限公司 All Rights Reserved.
 */
package com.smedi.ismedi.authoritymanagement.core.application.convert;

import com.smedi.ismedi.authoritymanagement.core.application.command.*;
import com.smedi.ismedi.authoritymanagement.core.domain.aggregatemodel.Element;
import com.smedi.ismedi.authoritymanagement.core.domain.aggregatemodel.ElementNode;
import com.smedi.ismedi.authoritymanagement.core.domain.dto.ElementQuery;
import com.smedi.ismedi.authoritymanagement.core.domain.dto.RoleAssignmentQuery;
import com.smedi.ismedi.authoritymanagement.core.domain.dto.RoleQuery;
import com.smedi.ismedi.authoritymanagement.core.port.adapter.persistence.model.RoleElementRelationshipEntity;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.ReportingPolicy;

import java.util.List;

/**
 * application Converter
 *
 * @author 15428
 * &#064;date  2022-06-07 15:22:03
 * @since 0.0.1
 */
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface AppConverter {
    RoleQuery roleListQueryCommandToRoleQuery(RoleListQueryCommand roleListQueryCommand);

    RoleAssignmentQuery roleAssignmentListQueryCommandToRoleAssignmentQuery(RoleAssignmentListQueryCommand roleAssignmentListQueryCommand);

    Element elementCreateCommandToElement(ElementCreateCommand elementCreateCommand);

    ElementQuery elementOneQueryToElementQuery(ElementOneQuery elementOneQuery);

    ElementQuery elementListQueryToElementQuery(ElementListQuery elementListQuery);

    ElementQuery elementPageQueryToElementQuery(ElementPageQuery elementPageQuery);

    Element updateElementByElementEditCommand(@MappingTarget Element Element, ElementEditCommand ElementEditCommand);

    ElementNode elementToNode(Element element);

    List<ElementNode> elementToNode(List<Element> elements);

    ElementQuery elementRemoveCommandToElementQuery(ElementRemoveCommand elementRemoveCommand);

    RoleElementRelationshipEntity roleElementRelationshipSaveCommandToRoleElementRelationshipEntity(RoleElementRelationshipSaveCommand roleElementRelationshipSaveCommand);

    List<RoleElementRelationshipEntity> roleElementRelationshipSaveCommandToRoleElementRelationshipEntity(List<RoleElementRelationshipSaveCommand> roleElementRelationshipSaveCommands);
}
